package com.jk.controller;

import com.jk.entity.BankCardEntity;
import com.jk.entity.BusinessEntity;
import com.jk.pojo.UserBean;
import com.jk.service.WithdrawService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;
import java.math.BigDecimal;

/**
 * @author 位佳生
 * @title: WithdrawController
 * @projectName springboot_financial
 * @description: TODO
 * @date 2022/11/716:34
 */
@RestController
@RequestMapping("withdraw")
public class WithdrawController {
    @Autowired
    private WithdrawService withdrawService;
    /*
    *
     * @Author 位佳生
     * @Description //TODO 根据提供的验证码、银行卡号和密码进行提现操作
     * @Date 2022/11/9 14:35
     * @param session: 
 * @param businessEntity: 
     * @return: java.lang.String
     **/
    @RequestMapping("BankCardWithdraw")
    public String BankCardWithdraw(HttpSession session, BusinessEntity businessEntity){
        return withdrawService.BankCardWithdraw(session,businessEntity);
    }
    /*
    *
     * @Author 位佳生
     * @Description //TODO 根据项目id和投资金额以及验证码和密码来进行判断进行投资，并新增一条投资记录新增到表内
     * @Date 2022/11/9 15:46
     * @param propertyId: 
 * @param price: 
 * @param userPwd: 
 * @param code: 
     * @return: java.lang.String
     **/
    @RequestMapping("getSave")
    public String getSave(Integer propertyId, BigDecimal price,String userPwd,String code){
        return withdrawService.getSave(propertyId,price,userPwd,code);
    }
    /*
    *
     * @Author 位佳生
     * @Description //TODO 查询当前用户余额
     * @Date 2022/11/16 14:42
     * @param null: 
     * @return: null
     **/
    public void getByIdUserMoney(){
         withdrawService.getByIdUserMoney();
    }


}
